{template 'common/header'}
<ol class="breadcrumb">
	<li><a href="./?refresh"><i class="fa fa-home"></i></a></li>
	<li><a href="{url 'system/welcome'}">系统</a></li>
</ol>
<style type="text/css">
    .panel-body > ul{list-style:none;margin: 0px;padding: 0px}
    .panel-body > ul li{display: inline-block}
</style>
<div class="main">
<ul class="nav nav-tabs">
    <li class="active"><a href="{php echo url('member/member');}">充值续费</a></li>
    <li><a href="{php echo url('member/buypackage');}">套餐购买</a></li>
    <li><a href="{php echo url('member/buysms');}">短信购买</a></li>
	{if $_W['isfounder']}
    <li><a href="{php echo url('member/record');}">会员消费</a></li>
	<li><a href="{php echo url('member/configs');}">服务配置</a></li>
    {/if}
</ul>
    <div style="width: 100%" >
        {template 'member/common/account'}
        <aside style="width: 50%;float: left; margin-top:30px;">
            <section>
                <div class="panel panel-default">
                    <div class="panel-heading">用户充值中心</div>
                    <div class="panel-body">
                        <form action="" class="form-horizontal form" method="post" enctype="multipart/form-data" target="_blank">
                            <div class="form-group">
                                <div class="col-sm-2"></div>
                                <div class="col-sm-8 text-center">
                                    <label class="radio-inline">
                                        <input type="radio" name="pay_type" value="baifubao" checked> 百付宝付款
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="pay_type" value="alipay"> 支付宝付款
                                    </label>
                                </div>
                                <div class="col-sm-2"></div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-2"></div>
                                <div class="col-sm-8">
                                    <div class="input-group" >
                                        <span class="input-group-addon">充值帐号</span>
                                        <input class="form-control" type="text" placeholder="充值帐号" value="{$_W[user][username]}"  disabled="disabled" >
                                        <input type="hidden" name="recharge_type" value="credit2">
                                    </div>
                                </div>
                                <div class="col-sm-2"></div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-2"></div>
                                <div class="col-sm-8">
                                    <div class="input-group" >
                                        <span class="input-group-addon">充值金额(<span style="color: red">最少充值10块</span>)</span>
                                        <input class="form-control" name="recharge_number" type="text" placeholder="充值金额" value="10"  >
                                        <span class="input-group-addon">元</span>
                                    </div>
                                </div>
                                <div class="col-sm-2"></div>
                            </div>
                        </form>
                    </div>
                    <div class="panel-footer" style="text-align: center">
                        <button type="button" class="btn btn-warning buy" id="{$item['id']}">确认充值</button>
                    </div>
                </div>
            </section>
        </aside>

        <aside style="width: 22%;float: left;margin-left: 5px; margin-top:30px;">
            <section>
                <div class="list-group bg-white set_list_group">
                    <span class="list-group-item">
                        <h4 style="text-align: center;color: red">服务公告</h4>
                        <div style="font-size: 13px">
                            {php echo html_entity_decode($settings['service_gg']);}
                        </div>
                    </span>
                </div>
            </section>
            <section>
                <div class="panel panel-default">
                    <div class="panel-heading">在线客服中心</div>
                    <div class="panel-body">
                        <div class="list-group bg-white set_list_group">
                            {loop $qqs $service}
                            <span class="list-group-item">
                                <i class="fa fa-qq"></i> <a target="_blank" style="color: blue" href="http://wpa.qq.com/msgrd?v=3&amp;uin={$service[qq]}&amp;site=qq&amp;menu=yes">{$service[name]}</a>
                            </span>
                            {/loop}
                        </div>
                    </div>
                </div>
            </section>
        </aside>
    </div>
</div>
<div class="modal fade" id="myModal" data-backdrop="static" style="top: 25%">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">充值提醒</h4>
            </div>
            <div class="modal-body" style="line-height: 30px;text-indent: 2em;font-size: 16px;font-weight: bold">
                请在新弹出的第三方支付平台完成支付，即可自动充值到帐户，未完成支付前请不要关闭本窗口。<br/>
                <span style="font-weight: normal;font-size: 14px;color: red">若充值过程中网络中断或失败，请拨打我司电话.</span>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-warning done">完成支付</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script type="text/javascript">
    require(['bootstrap'],function($){
        $("button.buy").on("click",function(){
            $("button.buy").removeAttr("disabled");
            $('#myModal').modal('show');
            $("form.form").action = "{php echo url('member/recharge')}";
            $("form.form").submit();
        });
        $("button.done").on("click",function(){
            location.reload();
        });
    });
</script>
{template 'member/common/footer'}